package com.ai.deepseekspring.controller;





import com.ai.deepseekspring.Anno.Auth;
import com.ai.deepseekspring.Result.R;
import com.ai.deepseekspring.service.VectorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
@RequestMapping("/vector")
public class VectorController {


    @Autowired
    private VectorService vectorService;

    @Auth
    @PostMapping("/store")
    public R storeadd(@RequestParam String content){
        System.out.println("content = " + content);

        return vectorService.add(content);
    }


    @GetMapping("/find")
    public List find(@RequestParam String content){
        return vectorService.find(content);
    }


    @Auth
    @DeleteMapping("/delete")
    public R storedelete(){
        return vectorService.delete();
    }

}
